<template>
  <div class="home">
    <div class="title-bar">
      <console-header v-if="console" :env="env"></console-header>
    </div>
    <div v-if="!console" style="margin-bottom: 50px"></div>
    <div class="content">
      <!-- 冻结用户 -->
      <div class="status">
        <div class="img">
          <img src="../../assets/404-images/gray_code@3x.png" alt="" />
        </div>
        <p class="content-text">当前账号暂不支持访问该页面</p>
        <p class="tip">当前帐号为RAM账号，暂不支持访问此页面</p>
        <button class="backbutton" @click="toIndex()">返回移动云首页</button>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
export default Vue.extend({
  components: {},
  props: {
    supportPools: {
      type: Array,
      default: function () {
        return [];
      },
    },
    env: {
      type: String,
      default: () => {
        const host = window.location.host;
        let env = "prod";
        if (host.includes("ecloud.10086.cn")) {
          switch (host) {
            case "ecloud.10086.cn:31015":
              env = "test";
              break;
            case "ecloud.10086.cn:31008":
              env = "dev";
              break;
            case "ecloud.10086.cn":
              env = "prod";
              break;
            default:
              env = "prod";
          }
        }
        return env;
      },
    },
    refreshCallback: {
      type: Function,
      default: null,
    },
  },
  data() {
    return {
      console: false,
      type: "",
    };
  },
  created() {},
  methods: {
    toIndex() {
      // console.log(this.$url_prefix)
      window.location.href=`${ this.$url_prefix }/home/`
    },
  },
});
</script>
<style lang="scss" scoped>
.home {
  width: 100vw;
  height: 100%;
  background-color: #eff1f4;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  .title-bar {
    flex-shrink: 0;
  }

  .navbar {
    width: 100%;
    height: 60px;
    background-color: #fff;
    padding: 0 1.5%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .navbar-title {
      height: 60px;
      font-family: PingFangSC-Regular;
      font-size: 16px;
      color: #031129;
      letter-spacing: 0;
      text-align: justify;
      line-height: 60px;
      font-weight: 400;
    }

    .navbar-right {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      color: #999999;

      p {
        padding: 0;
        margin: 0;
      }

      .product_detail {
        margin-right: 56px !important;
      }
    }
  }

  .content {
    width: 100%;
    height: calc(100% - 40px);
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;

    .status {
      width: 100%;
      height: 100%;
      background-color: #ffffff;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      flex-direction: column;
      padding-top: 70px;

      .approve {
        min-width: 80px;
        border: 0;
        width: max-content;
        height: 32px;
        background: #337dff;
        border-radius: 2px;
        font-family: Helvetica;
        font-size: 12px;
        color: #ffffff;
        letter-spacing: 0;
        line-height: 32px;
        font-weight: 400;
      }

      .img {
        width: 400px;
        height: 240px;
        img {
          width: 100%;
        }
      }

      p {
        margin: 0;
        padding: 0;
      }

      .content-text {
        font-family: PingFangSC-Semibold;
        font-size: 18px;
        color: #333333;
        letter-spacing: 0;
        text-align: center;
        font-weight: 600;
        margin: 10px 0 20px 0;
      }

      .tip {
        width: max-content;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #555555;
        letter-spacing: 0;
        text-align: center;
        font-weight: 400;
        margin-bottom: 20px;
      }

      .common {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 10px;
      }

      .backbutton {
        background-color: #337dff;
        color: #ffffff;
        border: 1px solid #337dff;
        padding: 5px 10px;
        font-size: small;
        border-radius: 2px;
      }
    }
  }
}
</style>
